﻿@model HomePageNewsItemsModel
@using Nop.Core.Domain.Catalog;
@using Nop.Core.Infrastructure;
@using Nop.Services.Catalog;
@using Nop.Web.Models.News;
@if (Model.NewsItems.Count > 0)
{
    <div class="news-list-homepage">
        <div class="page-title">
            <a href="@Url.RouteUrl("NewsRSS", new { languageId = Model.WorkingLanguageId })" class="link-rss" title="@T("News.RSS.Hint")">@T("News.RSS")</a>
            <h4>@T("News")</h4>
        </div>
        <div class="clear">
        </div>
        <div class="news-items">
            @foreach (var item in Model.NewsItems)
            {
                <div class="item">
                    <a class="news-title" href="@Url.RouteUrl("NewsItem", new { newsItemId = item.Id, SeName = item.SeName })">
                        @item.Title</a> <span class="news-date">-
                            @item.CreatedOn.ToString("D")
                        </span>
                    <div class="news-details">
                        @Html.Raw(item.Short)
                    </div>
                    <a href="@Url.RouteUrl("NewsItem", new { newsItemId = item.Id, SeName = item.SeName })" class="read-more">
                        @T("News.MoreInfo")</a>
                </div>
            }
            <div class="view-all">
                <a href="@Url.RouteUrl("NewsArchive")">
                    @T("News.ViewAll")</a>
            </div>
        </div>
    </div>

}